<!DOCTYPE html>
<html lang="en">
  <head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">


  <title>Skaffold-简化本地开发kubernetes应用的神器-blog.qikqiak.com|阳明的博客|Kubernetes|Docker|Python|Golang|Cloud Native</title>
  <meta property="og:title" content="Skaffold-简化本地开发kubernetes应用的神器" />
  <meta name="twitter:title" content="Skaffold-简化本地开发kubernetes应用的神器" />

  <meta name="description" content="墙裂推荐kubernetes应用开发者使用的工具">
  <meta property="og:description" content="墙裂推荐kubernetes应用开发者使用的工具">
  <meta name="twitter:description" content="墙裂推荐kubernetes应用开发者使用的工具">
  <meta name="author" content=""/>
  <link href='https://blog.qikqiak.com/img/favicon.ico' rel='icon' type='image/x-icon'/>
  <meta property="og:image" content="https://blog.qikqiak.com/img/avatar.jpeg" />
  <meta name="twitter:image" content="https://blog.qikqiak.com/img/avatar.jpeg" />
  <meta name="twitter:card" content="summary" />
  <meta property="og:url" content="https://blog.qikqiak.com/post/skaffold-simple-local-develop-k8s-app-tools/" />
  <meta property="og:type" content="website" />
  <meta property="og:site_name" content="阳明的博客" />

  <meta name="generator" content="Hugo 0.34" />
  <link rel="canonical" href="https://blog.qikqiak.com/post/skaffold-simple-local-develop-k8s-app-tools/" />
  <link rel="alternate" href="https://blog.qikqiak.com/index.xml" type="application/rss+xml" title="阳明的博客">
  <link href="https://cdn.bootcss.com/KaTeX/0.7.1/katex.min.css" rel="stylesheet">
  <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
  <link rel="stylesheet" href="https://blog.qikqiak.com/css/main.css?t=1235" />
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" />
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" />
  <link rel="stylesheet" href="https://blog.qikqiak.com/css/pygment_highlights.css" />
  <link rel="stylesheet" href="https://blog.qikqiak.com/css/highlight.min.css" />
  <link rel="stylesheet" href="https://blog.qikqiak.com/css/prism.css?t=123" />
  <link rel="stylesheet" href="https://blog.qikqiak.com/css/search.css" />
<meta name="keywords" content="kubernetes, skaffold, 持续开发, 神器, CI/CD">
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?970de9920f6089c287a7fd366138d4e9";
  var s = document.getElementsByTagName("script")[0];
  s.parentNode.insertBefore(hm, s);
})();
</script>



<link href="https://cdn.bootcss.com/photoswipe/4.1.1/photoswipe.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/photoswipe/4.1.1/default-skin/default-skin.min.css" rel="stylesheet">



<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

<div class="pswp__bg"></div>

<div class="pswp__scroll-wrap">
    
    <div class="pswp__container">
      <div class="pswp__item"></div>
      <div class="pswp__item"></div>
      <div class="pswp__item"></div>
    </div>
    
    <div class="pswp__ui pswp__ui--hidden">
    <div class="pswp__top-bar">
      
      <div class="pswp__counter"></div>
      <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
      <button class="pswp__button pswp__button--share" title="Share"></button>
      <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
      <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
      
      
      <div class="pswp__preloader">
        <div class="pswp__preloader__icn">
          <div class="pswp__preloader__cut">
            <div class="pswp__preloader__donut"></div>
          </div>
        </div>
      </div>
    </div>
    <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
      <div class="pswp__share-tooltip"></div>
    </div>
    <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
    </button>
    <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
    </button>
    <div class="pswp__caption">
      <div class="pswp__caption__center"></div>
    </div>
    </div>
    </div>
</div>

<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-69668147-3', 'auto');
ga('send', 'pageview');
</script>
<script async src='//www.google-analytics.com/analytics.js'></script>

</head>

  <body>
    <nav class="navbar navbar-default navbar-fixed-top navbar-custom">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="https://blog.qikqiak.com/">阳明的博客</a>
    </div>

    <div class="collapse navbar-collapse" id="main-navbar">
      <ul class="nav navbar-nav navbar-right">
        
          
            <li>
              <a title="Home" href="https://ydzs.io">Home</a>
            </li>
          
        
          
            <li class="navlinks-container">
              <a class="navlinks-parent" href="javascript:void(0)">Categories</a>
              <div class="navlinks-children">
                
                  <a href="https://blog.qikqiak.com/page/archive/">Archive</a>
                
                  <a href="https://blog.qikqiak.com/tags">tags</a>
                
                  <a href="https://blog.qikqiak.com/tags/kubernetes">kubernetes</a>
                
                  <a href="https://blog.qikqiak.com/tags/python">python</a>
                
                  <a href="https://blog.qikqiak.com/tags/django">django</a>
                
                  <a href="https://blog.qikqiak.com/tags/ops">devops</a>
                
              </div>
            </li>
          
        
          
            <li class="navlinks-container">
              <a class="navlinks-parent" href="javascript:void(0)">海马学院</a>
              <div class="navlinks-children">
                
                  <a href="https://www.haimaxy.com/course/6y02wp/?utm_source=blog&amp;utm_campaign=referral&amp;utm_medium=topmenu">Python微服务实战</a>
                
                  <a href="https://www.haimaxy.com/course/pww13p/?utm_source=blog&amp;utm_campaign=referral&amp;utm_medium=topmenu">Webpack3.x 入门</a>
                
                  <a href="https://www.haimaxy.com/course/pjrqxm/?utm_source=blog&amp;utm_campaign=referral&amp;utm_medium=topmenu">Kubernetes 集群搭建</a>
                
              </div>
            </li>
          
        
          
            <li>
              <a title="About" href="https://blog.qikqiak.com/page/about/">About</a>
            </li>
          
        

        

        

        
          <li>
            <a href="#modalSearch" data-toggle="modal" data-target="#modalSearch" style="outline: none;">
              <span class="hidden-sm hidden-md hidden-lg">Search</span> <span id="searchGlyph" class="glyphicon glyphicon-search"></span>
            </a>
          </li>
          

      </ul>
    </div>

    <div class="avatar-container">
      <div class="avatar-img-border">
        
          <a title="阳明的博客" href="https://blog.qikqiak.com/">
            <img class="avatar-img" src="https://blog.qikqiak.com/img/avatar.jpeg" alt="阳明的博客" />
          </a>
        
      </div>
    </div>

  </div>
</nav>





  <div id="modalSearch" class="modal fade" role="dialog">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title">Search blog.qikqiak.com</h4>
        </div>
        <div class="modal-body">
            
<div class="aa-input-container" id="aa-input-container">
    <input type="search" id="aa-search-input" class="aa-input-search" placeholder="Search for titles or URIs..." name="search" autocomplete="off" />
    <svg class="aa-input-icon" viewBox="654 -372 1664 1664">
        <path d="M1806,332c0-123.3-43.8-228.8-131.5-316.5C1586.8-72.2,1481.3-116,1358-116s-228.8,43.8-316.5,131.5  C953.8,103.2,910,208.7,910,332s43.8,228.8,131.5,316.5C1129.2,736.2,1234.7,780,1358,780s228.8-43.8,316.5-131.5  C1762.2,560.8,1806,455.3,1806,332z M2318,1164c0,34.7-12.7,64.7-38,90s-55.3,38-90,38c-36,0-66-12.7-90-38l-343-342  c-119.3,82.7-252.3,124-399,124c-95.3,0-186.5-18.5-273.5-55.5s-162-87-225-150s-113-138-150-225S654,427.3,654,332  s18.5-186.5,55.5-273.5s87-162,150-225s138-113,225-150S1262.7-372,1358-372s186.5,18.5,273.5,55.5s162,87,225,150s113,138,150,225  S2062,236.7,2062,332c0,146.7-41.3,279.7-124,399l343,343C2305.7,1098.7,2318,1128.7,2318,1164z" />
    </svg>
</div>
<script src="https://res.cloudinary.com/jimmysong/raw/upload/rootsongjc-hugo/algoliasearch.min.js"></script>
<script src="https://res.cloudinary.com/jimmysong/raw/upload/rootsongjc-hugo/autocomplete.min.js"></script>

<script>
var client = algoliasearch("1JDRAS0AZR", "8804ac109158bb3bb60d74ce98fa332f");
var index = client.initIndex('prod_blog');

autocomplete('#aa-search-input',
{ hint: false}, {
    source: autocomplete.sources.hits(index, {hitsPerPage: 5}),
    
    displayKey: 'name',
    
    templates: {
        
        suggestion: function(suggestion) {
            return '<span>' + '<a href="https://blog.qikqiak.com/post/' + suggestion.slug + '">' +
            suggestion._highlightResult.title.value + '</a></span>';
        }
    }
});
</script>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">close</button>
        </div>
      </div>
    </div>
  </div>

    
  
  
  




  
    <div id="header-big-imgs" data-num-img=1 data-img-src-1="https://blog.qikqiak.com/img/posts/photo-1509565840034-3c385bbe6451.jpeg" data-img-desc-1="nothing"></div>
  

  <header class="header-section has-img">
    
      <div class="intro-header big-img">
        
        <div class="container">
          <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
              <div class="post-heading">
                <h1>Skaffold-简化本地开发kubernetes应用的神器</h1>
                  
                    
                      <h2 class="post-subheading">墙裂推荐kubernetes应用开发者使用的工具</h2>
                    
                  
                  
                    <span class="post-meta">
  Posted on March 27, 2018
  
</span>


                  
              </div>
            </div>
          </div>
        </div>
        <span class="img-desc" style="display: inline;"></span>
      </div>
    
    <div class="intro-header no-img">
      
      <div class="container">
        <div class="row">
          <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
            <div class="post-heading">
              <h1>Skaffold-简化本地开发kubernetes应用的神器</h1>
                
                  
                    <h2 class="post-subheading">墙裂推荐kubernetes应用开发者使用的工具</h2>
                  
                
                
                  <span class="post-meta">
  Posted on March 27, 2018
  
</span>


                
            </div>
          </div>
        </div>
      </div>
    </div>
  </header>


    
<div class="container" role="main">
  <div class="row">
    <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">

      <div>
          
          
          <h5 id="tags" style="margin-top: 0px;">标签:
            
                <a href="https://blog.qikqiak.com/tags/kubernetes/">kubernetes</a> &nbsp;
            
                <a href="https://blog.qikqiak.com/tags/skaffold/">skaffold</a> &nbsp;
            
                <a href="https://blog.qikqiak.com/tags/ci/cd/">CI/CD</a> &nbsp;
            
          </h5>
          
      </div>

      <article role="main" class="blog-post">
        <p>在我们开发<code>kubernetes</code>应用的过程中，一般情况下是我们在本地开发调试测试完成以后，再通过<code>CI/CD</code>的方式部署到<code>kubernetes</code>的集群中，这个过程首先是非常繁琐的，而且效率非常低下，因为你想验证你的每次代码修改，就得提交代码重新走一遍<code>CI/CD</code>的流程，我们知道编译打包成镜像这些过程就是很耗时的，即使我们在自己本地搭建一套开发<code>kubernetes</code>集群，也同样的效率很低。在实践中，若不在本地运行那些服务，调试将变得颇具挑战。就在几天前，我遇到了<code>Skaffold</code>，它是一款命令行工具，旨在促进<code>kubernetes</code>应用的持续开发，<code>Skaffold</code>可以将构建、推送及向<code>kubernetes</code>集群部署应用程序的过程自动化，听上去是不是很舒服呀~~~</p>

<p></p>

<h2 id="介绍">介绍</h2>

<p><code>Skaffold</code>是一款命令行工具，旨在促进<code>Kubernetes</code>应用的持续开发。你可以在本地迭代应用源码，然后将其部署到本地或者远程<code>Kubernetes</code>集群中。<code>Skaffold</code>会处理构建、上传和应用部署方面的工作流。它通用可以在自动化环境中使用，例如<code>CI/CD</code>流水线，以实施同样的工作流，并作为将应用迁移到生产环境时的工具 —— <code>Skaffold</code>官方文档</p>

<p><code>Skaffold</code>的特点：</p>

<ul>
<li>没有服务器端组件，所以不会增加你的集群开销</li>
<li>自动检测源代码中的更改并自动构建/推送/部署</li>
<li>自动更新镜像<strong>TAG</strong>，不要担心手动去更改<code>kubernetes</code>的 manifest 文件</li>
<li>一次性构建/部署/上传不同的应用，因此它对于微服务同样完美适配</li>
<li>支持开发环境和生产环境，通过仅一次运行manifest，或者持续观察变更</li>
</ul>

<p>另外<code>Skaffold</code>是一个可插拔的架构，允许开发人员选择自己最合适的工作流工具
<img src="https://blog.qikqiak.com/img/posts/plugability.png" alt="Skaffold" /></p>

<p>我们可以通过下面的 gif 图片来了解<code>Skaffold</code>的使用
<img src="https://my-oss-testing.oss-cn-beijing.aliyuncs.com/blog/intro.gif" alt="skaffold-demo" /></p>

<h2 id="使用">使用</h2>

<p>要使用<code>Skaffold</code>最好是提前在我们本地安装一套单节点的<code>kubernetes</code>集群，比如<code>minikube</code>或者<code>Docker for MAC/Windows</code>的<strong>Edge</strong>版</p>

<h3 id="安装">安装</h3>

<p>您将需要安装以下组件后才能开始使用<code>Skaffold</code>：</p>

<h4 id="1-skaffold">1. skaffold</h4>

<p>下载最新的<code>Linux</code>版本，请运行如下命令：</p>

<pre><code class="language-shell">$ curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 &amp;&amp; chmod +x skaffold &amp;&amp; sudo mv skaffold /usr/local/bin
</code></pre>

<p>下载最新的<code>OSX</code>版本，请运行：</p>

<pre><code class="language-shell">$ curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-darwin-amd64 &amp;&amp; chmod +x skaffold &amp;&amp; sudo mv skaffold /usr/local/bin
</code></pre>

<p>当然如果由于某些原因你不能访问上面的链接的话，则可以前往<code>Skaffold</code>的<a href="https://github.com/GoogleCloudPlatform/skaffold/releases">github release</a>页面下载相应的安装包。</p>

<h4 id="2-kubernetes集群">2. Kubernetes集群</h4>

<p>其中<a href="https://kubernetes.io/docs/tasks/tools/install-minikube/">Minikube</a>， <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-container-cluster">GKE</a>， <a href="https://docs.docker.com/docker-for-mac/install/">Docker for Mac（Edge）</a>和<a href="https://docs.docker.com/docker-for-windows/install/">Docker for Windows（Edge）</a> 已经过测试，但任何<code>kubernetes</code>群集都是可以使用，为了简单起见，我这里使用的是<code>Docker for Mac（Edge）</code></p>

<h4 id="3-kubectl">3. kubectl</h4>

<p>要使用<code>kubernetes</code>那么肯定<code>kubectl</code>也是少不了的，在本地配置上你的目标群集的当前上下文进行开发</p>

<h4 id="4-docker">4. Docker</h4>

<p>这个应该不用多说了吧？</p>

<h4 id="5-docker-镜像仓库">5. Docker 镜像仓库</h4>

<p>如果你有私有的镜像仓库，则要先配置上相关的登录认证之类的。我这里为了方便，就直接使用<code>Docker Hub</code>，当然要往上面推送镜像的话，你得提前去<a href="https://hub.docker.com">docker hub</a>注册一个帐号</p>

<h3 id="开发">开发</h3>

<p>我们可以在本地开发一个非常简单的应用程序，然后通过<code>Skaffold</code>来进行迭代开发，这里我们直接使用<code>Skaffold</code>的官方示例，首先<strong>clone</strong>代码：</p>

<pre><code class="language-shell">$ git clone https://github.com/GoogleCloudPlatform/skaffold
</code></pre>

<p>然后我们定位到<code>examples/getting-started</code>目录下去：</p>

<pre><code class="language-shell">$ cd examples/getting-started
$ tree .
.
├── Dockerfile
├── k8s-pod.yaml
├── main.go
├── skaffold-gcb.yaml
└── skaffold.yaml

0 directories, 5 files
</code></pre>

<p>该目录下面有一个非常简单的<code>golang</code>程序:（main.go）</p>

<pre><code class="language-golang">package main
import (
    &quot;fmt&quot;
    &quot;time&quot;
)

func main() {
    for {
        fmt.Println(&quot;Hello Skaffold!&quot;)
        time.Sleep(time.Second * 2)
    }
}
</code></pre>

<p>其中<code>skaffold-gcb.yaml</code>文件我们可以暂时忽略，这个文件是和google cloud结合使用的，我们可以看下<code>skaffold.yaml</code>文件内容，这里我已经将镜像名称改成了我自己的了（cnych/skaffold-example），如下：</p>

<pre><code class="language-yaml">apiVersion: skaffold/v1alpha1
kind: Config
build:
  artifacts:
  - imageName: cnych/skaffold-example
    workspace: .
  local: {}
deploy:
  kubectl:
    manifests:
    - paths:
      - k8s-*
      parameters:
        IMAGE_NAME: cnych/skaffold-example
</code></pre>

<p>然后我们可以看到<code>k8s-pod.yaml</code>文件，其中的镜像名称是一个<code>IMAGE_NAME</code>的参数，这个地方<code>Skaffold</code>会自动帮我们替换成正在的镜像地址的，所以不用我们做任何更改了，如下：</p>

<pre><code class="language-yaml">apiVersion: v1
kind: Pod
metadata:
  name: getting-started
spec:
  containers:
  - name: getting-started
    image: IMAGE_NAME
</code></pre>

<p>然后我们就可以在<code>getting-started</code>目录下面执行<code>skaffold dev</code>命令了：</p>

<pre><code class="language-shell">$ skaffold dev
Starting build...
Found minikube or Docker for Desktop context, using local docker daemon.
Sending build context to Docker daemon  6.144kB
Step 1/5 : FROM golang:1.9.4-alpine3.7
 ---&gt; fb6e10bf973b
Step 2/5 : WORKDIR /go/src/github.com/GoogleCloudPlatform/skaffold/examples/getting-started
 ---&gt; Using cache
 ---&gt; e6ae5322ee52
Step 3/5 : CMD [&quot;./app&quot;]
 ---&gt; Using cache
 ---&gt; bac5f3fd392e
Step 4/5 : COPY main.go .
 ---&gt; Using cache
 ---&gt; 47fa1e536263
Step 5/5 : RUN go build -o app main.go
 ---&gt; Using cache
 ---&gt; f1470fe9f398
Successfully built f1470fe9f398
Successfully tagged a250d03203f9a5df267d8ad63bae8dba:latest
Successfully tagged cnych/skaffold-example:f1470fe9f3984775f5dea87b5f720d67b6c2eeaaf2ca5efd1ca3c3ec7c4d4cce
Build complete.
Starting deploy...
Deploying k8s-pod.yaml...
Deploy complete.
Dependencies may be incomplete.
[getting-started getting-started] Hello Skaffold!
[getting-started getting-started] Hello Skaffold!
</code></pre>

<p><code>Skaffold</code>已经帮我们做了很多事情了：</p>

<ul>
<li>用本地源代码构建 Docker 镜像</li>
<li>用它的<code>sha256</code>值作为镜像的标签</li>
<li>设置<code>skaffold.yaml</code>文件中定义的 kubernetes manifests 的镜像地址</li>
<li>用<code>kubectl apply -f</code>命令来部署 kubernetes 应用</li>
</ul>

<p>部署完成后，我们可以看到 pod 打印出了如下的信息：</p>

<pre><code class="language-shell">[getting-started getting-started] Hello Skaffold!
[getting-started getting-started] Hello Skaffold!
[getting-started getting-started] Hello Skaffold!
</code></pre>

<p>同样的，我们可以通过<code>kubectl</code>工具查看当前部署的 POD：</p>

<pre><code class="language-shell">$ kubectl get pods
NAME              READY     STATUS    RESTARTS   AGE
getting-started   1/1       Running   3          1h
</code></pre>

<p>然后我们可以打印出上面的 POD 的详细信息：</p>

<pre><code class="language-shell">$ kubectl get pod getting-started  -o yaml
...
spec:
  containers:
  - image: cnych/skaffold-example:f1470fe9f3984775f5dea87b5f720d67b6c2eeaaf2ca5efd1ca3c3ec7c4d4cce
    imagePullPolicy: IfNotPresent
    name: getting-started
...
</code></pre>

<p>我们可以看到我们部署的 POD 的镜像地址，和我们已有的 docker 镜像地址和标签是一样的：</p>

<pre><code class="language-shell">$ docker images |grep skaffold
cnych/skaffold-example                                    f1470fe9f3984775f5dea87b5f720d67b6c2eeaaf2ca5efd1ca3c3ec7c4d4cce   f1470fe9f398        8 minutes ago       271MB
</code></pre>

<p>现在，我们来更改下我们的<code>main.go</code>文件：</p>

<pre><code class="language-golang">package main
import (
    &quot;fmt&quot;
    &quot;time&quot;
)

func main() {
    for {
        fmt.Println(&quot;Hello blog.qikqiak.com!&quot;)
        time.Sleep(time.Second * 2)
    }
}
</code></pre>

<p>当我们保存该文件后，观察 POD 的输出信息：</p>

<pre><code class="language-shell">[getting-started getting-started] Hello Skaffold!
[getting-started getting-started] Hello Skaffold!
[getting-started getting-started] Hello blog.qikqiak.com!
[getting-started getting-started] Hello blog.qikqiak.com!
[getting-started getting-started] Hello blog.qikqiak.com!
[getting-started getting-started] Hello blog.qikqiak.com!
[getting-started getting-started] Hello blog.qikqiak.com!
</code></pre>

<p>是不是立刻就变成了我们修改的结果了啊，同样我们可以用上面的样式去查看下 POD 里面的镜像标签是已经更改过了。</p>

<h2 id="总结">总结</h2>

<p>我这里为了说明<code>Skaffold</code>的使用，可能描述显得有点拖沓，但是当你自己去使用的时候，就完全能够感受到<code>Skaffold</code>为开发<code>kubernetes</code>应用带来的方便高效，大大的提高了我们的生产力。
另外在<code>kubernetes</code>开发自动化工具领域，还有一些其他的选择，比如<code>Azure</code>的<a href="https://draft.sh/">Draft</a>、Datawire 的 Forge 以及 Weavework 的 Flux，大家都可以去使用一下，其他微软的<code>Draft</code>是和<code>Helm</code>结合得非常好，不过<code>Skaffold</code>当然也是支持的，工具始终是工具，能为我们提升效率的就是好工具，不过从开源的角度来说，信 Google 准没错。</p>

<h2 id="参考资料">参考资料</h2>

<ul>
<li><a href="https://github.com/GoogleCloudPlatform/skaffold">https://github.com/GoogleCloudPlatform/skaffold</a></li>
<li><a href="https://draft.sh/">https://draft.sh/</a></li>
</ul>
      </article>

      
        

<h3>相关文章</h3>
<ul style="margin-bottom: 25px;">
    
    <li><a href="https://blog.qikqiak.com/post/k8s-tech-weekly-collection-phase2/">k8s技术圈一周精选[第2期]</a></li>
    
    <li><a href="https://blog.qikqiak.com/post/kubernetes-resource-quota-usage/">kubernetes 的资源配额控制器</a></li>
    
    <li><a href="https://blog.qikqiak.com/post/k8s-tech-weekly-collection-phase1/">k8s技术圈一周精选[第1期]</a></li>
    
    <li><a href="https://blog.qikqiak.com/post/understand-kubernetes-affinity/">理解 Kubernetes 的亲和性调度</a></li>
    
    <li><a href="https://blog.qikqiak.com/post/use-downward-api-get-pod-info/">Kubernetes Downward API 基本用法</a></li>
    
    <li><a href="https://blog.qikqiak.com/post/write-kubernets-golang-service-step-by-step/">手摸手教你写 Kubernetes 的 golang 服务</a></li>
    
    <li><a href="https://blog.qikqiak.com/post/use-yaml-create-kubernetes-deployment/">使用YAML 文件创建 Kubernetes Deployment</a></li>
    
    <li><a href="https://blog.qikqiak.com/post/how-to-use-podpreset-in-kubernetes/">kubernetes PodPreset 的使用</a></li>
    
    <li><a href="https://blog.qikqiak.com/post/first-use-helm-on-kubernetes/">Kubernetes Helm 初体验</a></li>
    
    <li><a href="https://blog.qikqiak.com/post/understand-kubernetes-configmap-and-secrets/">kubernetes ConfigMap 和 Secrets</a></li>
    
</ul>

      

      
      <ul class="pager blog-pager">
        
          <li class="previous">
            <a href="https://blog.qikqiak.com/post/k8s-tech-weekly-collection-phase2/" data-toggle="tooltip" data-placement="top" title="k8s技术圈一周精选[第2期]">&larr; Previous Post</a>
          </li>
        
        
          <li class="next">
            <a href="https://blog.qikqiak.com/post/k8s-tech-weekly-collection-phase3/" data-toggle="tooltip" data-placement="top" title="k8s技术圈一周精选[第3期]">Next Post &rarr;</a>
          </li>
        
      </ul>
      

      

      
      <div id="git-comments"></div>
      <link rel="stylesheet" href="https://imsun.github.io/gitment/style/default.css">
      <script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>
      <script>
      var gitment = new Gitment({
        id: 'skaffold-simple-local-develop-k8s-app-tools',
        owner: 'cnych',
        repo: 'blog',
        oauth: {
          client_id: 'bdb76dbb2e9d0786e350',
          client_secret: 'b454b2a08013fd0e32013be7a63fa8fcb262b6c4',
        }
      })
      gitment.render('git-comments')
      </script>
      

    </div>
  </div>
</div>

    <footer>
  <div class="container">
    <div class="row">
      <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
        <ul class="list-inline text-center footer-links">
          
              <li>
                <a href="mailto:icnych@gmail.com" title="Email me">
                  <span class="fa-stack fa-lg">
                    <i class="fa fa-circle fa-stack-2x"></i>
                    <i class="fa fa-envelope fa-stack-1x fa-inverse"></i>
                  </span>
                </a>
              </li>
          
              <li>
                <a href="https://github.com/cnych" title="GitHub">
                  <span class="fa-stack fa-lg">
                    <i class="fa fa-circle fa-stack-2x"></i>
                    <i class="fa fa-github fa-stack-1x fa-inverse"></i>
                  </span>
                </a>
              </li>
          
              <li>
                <a href="https://weibo.com/cnych" title="微博">
                  <span class="fa-stack fa-lg">
                    <i class="fa fa-circle fa-stack-2x"></i>
                    <i class="fa fa-weibo fa-stack-1x fa-inverse"></i>
                  </span>
                </a>
              </li>
          
              <li>
                <a href="https://instagram.com/cnych" title="Instagram">
                  <span class="fa-stack fa-lg">
                    <i class="fa fa-circle fa-stack-2x"></i>
                    <i class="fa fa-instagram fa-stack-1x fa-inverse"></i>
                  </span>
                </a>
              </li>
          
          
          <li>
            <a href="https://blog.qikqiak.com/index.xml" title="RSS">
              <span class="fa-stack fa-lg">
                <i class="fa fa-circle fa-stack-2x"></i>
                <i class="fa fa-rss fa-stack-1x fa-inverse"></i>
              </span>
            </a>
          </li>
          
        </ul>
        <p class="credits copyright text-muted">
          

          &nbsp;&bull;&nbsp;
          2018

          
            &nbsp;&bull;&nbsp;
            <a href="https://blog.qikqiak.com/">阳明的博客</a>
          
        </p>
        
        <p class="credits theme-by text-muted">
          <a href="http://gohugo.io">Hugo v0.34</a> powered &nbsp;&bull;&nbsp; Theme by <a href="http://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> adapted to <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>
          
        </p>
      </div>
    </div>
  </div>
</footer>

<script src="https://cdn.bootcss.com/KaTeX/0.7.1/katex.min.js"></script>
<script src="https://cdn.bootcss.com/KaTeX/0.7.1/contrib/auto-render.min.js"></script>
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://blog.qikqiak.com/js/main.min.js"></script>
<script src="https://blog.qikqiak.com/js/highlight.min.js"></script>
<script> hljs.initHighlightingOnLoad(); </script>
<script> renderMathInElement(document.body); </script>
<script src="https://blog.qikqiak.com/js/prism.js?t=123"></script>
<script src="https://cdn.bootcss.com/photoswipe/4.1.1/photoswipe.min.js"></script>
<script src="https://cdn.bootcss.com/photoswipe/4.1.1/photoswipe-ui-default.min.js"></script>
<script src="https://blog.qikqiak.com/js/load-photoswipe.min.js"></script>



<script async src="https://www.googletagmanager.com/gtag/js?id=UA-69668147-3"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'UA-69668147-3');
</script>

  </body>
</html>

